Completed
Pull Request — develop (#230)
by Markus
05:18 queued 03:24
created

script.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 7
Bugs 0 Features 0
Metric Value
cc 1
c 7
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 9.4285
1
import $ from 'jquery'
2
3
import * as acceptButton from './Partials/AcceptButton/script'
4
5
class BlockCookieNotification extends window.HTMLDivElement {
6
  constructor (self) {
7
    self = super(self)
8
    self.$ = $(self)
9
    return self
0 ignored issues
show
Bug introduced by
The constructor does not have a meaningful return value. Are you sure this is correct?
Loading history...
10
  }
11
12
  connectedCallback () {
13
    this.$.on('click', '.acceptButton', (e) => {
14
      e.preventDefault()
15
      acceptButton.acceptCookies(this.$)
16
    })
17
    acceptButton.checkCookies(this.$)
18
  }
19
}
20
21
window.customElements.define('flynt-block-cookie-notification', BlockCookieNotification, {extends: 'div'})
22